package com.chunfen.tomcat.designpattern;

public class SoldOutState extends State {

    SoldOutState(GumballMachine gumballMachine){
        this.gumballMachine = gumballMachine;
    }

    @Override
    protected void insertQuarter() {
        System.out.println("You can't insert a quarter, the machine is sold out");
    }

    @Override
    protected void ejectQuarter() {
        System.out.println("You can't eject, you haven't inserted a quarter yet");
    }

    @Override
    protected void turnCrank() {
        System.out.println("You returned, but there are no gumballs");
    }

    @Override
    protected void dispense() {
        System.out.println("No gumball dispense, pleas content stuff");
        // refill(4)  继续销售
    }
}
